package com.kgc.storeprovider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.store.pojo.InventoryCheckDetail;
import com.kgc.store.remote.InventoryCheckDetailRemote;
import com.kgc.storeprovider.service.InventoryCheckDetailService;
import com.kgc.storeprovider.service.InventoryCheckService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class InventoryCheckDetailController implements InventoryCheckDetailRemote {

    private Logger logger = LoggerFactory.getLogger(getClass());
    @Autowired
    private InventoryCheckDetailService inventoryCheckDetailService;
    @Override
    public ResponseMsg getInventoryCheckDetailList(String inventoryCheckCode) {
        logger.info("InventoryCheckDetailController getInventoryCheckDetailList inventoryCheckCode:"+inventoryCheckCode);
        ResponseMsg msg = inventoryCheckDetailService.getInventoryCheckDetailList(inventoryCheckCode);
        logger.debug("InventoryCheckDetailController getInventoryCheckDetailList msg:"+msg);
        return msg;
    }

    @Override
    public ResponseMsg delInventoryCheckDetail(String inventoryCheckCode) {
        logger.info("InventoryCheckDetailController delInventoryCheckDetail inventoryCheckCode:"+inventoryCheckCode);
        ResponseMsg msg = inventoryCheckDetailService.delInventoryCheckDetail(inventoryCheckCode);
        logger.debug("InventoryCheckDetailController delInventoryCheckDetail msg:"+msg);
        return msg;
    }

    @Override
    public ResponseMsg insertInventoryCheckDetail(InventoryCheckDetail inventoryCheckDetail) {
        logger.info("InventoryCheckDetailController insertInventoryCheckDetail inventoryCheckDetail:"+inventoryCheckDetail);
        ResponseMsg msg = inventoryCheckDetailService.insertInventoryCheckDetail(inventoryCheckDetail);
        logger.debug("InventoryCheckDetailController insertInventoryCheckDetail msg:"+msg);
        return msg;
    }
}
